import {
  Column,
  CreateDateColumn,
  Entity,
  PrimaryGeneratedColumn,
  UpdateDateColumn,
} from 'typeorm';
@Entity('user-admin')
export class UserAdmin {
  @PrimaryGeneratedColumn()
  id: string;
  @Column({ name: '用户名' })
  name: string;
  @Column({ name: '用户昵称', nullable: true })
  nickname: string;
  @Column({ name: '部门', nullable: true })
  deptId: number;
  @Column({ name: '性别', default: 1 })
  gender: number;
  // 角色列表
  @Column({ name: '角色列表', nullable: true })
  roleIds: string;
  @Column({ name: '手机号' })
  phone: string;
  @Column({ name: '邮箱', nullable: true })
  email: string;
  @Column({ name: '状态', default: 1 })
  status: number;
  @Column({
    name: '头像',
    default:
      'https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif',
  })
  avatar: string;
  @CreateDateColumn({ name: '创建时间' })
  createTime: Date;
  @UpdateDateColumn({ name: '修改时间' })
  updateTime: Date;
}
